import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

class TextLineHeightDemoPage extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    return TextLineHeightDemoPageState();
  }
}

class TextLineHeightDemoPageState extends State<TextLineHeightDemoPage> {
  final double fontSize = 16;

  final double leading = 0.9;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(title: Text('文本行间距 例子')),
        body: Container(
            child: Container(
          margin: EdgeInsets.all(20),
          color: Colors.blueGrey,
          child: Transform.translate(
            offset: Offset(0, 0),
            child: new Text(
              textContent,
              strutStyle: StrutStyle(
                forceStrutHeight: true,
                height: 1,
                leading: 0.9,
              ),
              style: TextStyle(
                fontSize: fontSize,
                color: Colors.black,
              ),
            ),
          ),
        )));
  }
}

const textContent =
    "Today I was amazed to see the usually positive and friendly VueJS community descend into a bitter war. Two weeks ago Vue creator Evan You released a Request for Comment (RFC) for a new function-based way of writing Vue components in the upcoming Vue 3.0. Today a critical "
    "Reddit thread followed by similarly "
    "critical comments in a Hacker News thread caused a "
    "flood of developers to flock to the original RFC to "
    "voice their outrage, some of which were borderline abusive. "
    "It was claimed in various places that";
